<template>
  <div class="header-box">
    <div class="header">
      <van-icon name="arrow-left" size="20px" @click="goBack" />
      <slot>插槽</slot>
      <p><slot name="map">插槽</slot></p>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    goBack() {
      this.$router.go(-1);
    },
  },
};
</script>

<style>
.header-box {
  width: 100%;
  height: 50px;
}
.header {
  width: 100%;
  height: 100%;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header > input {
  height: 25px;
  border-radius: 40px;
  outline: none;
  border: 1px solid #ccc;
  text-indent: 10px;
  font-size: 13px;
}
</style>
